package mobile.game.common.config.json;


import org.apache.commons.lang3.builder.ToStringBuilder;

import mobile.game.core.CallPoint;

public class JInfo {
	JNode jNode;
	JPort jPort;
	JService jService;
	
	public JInfo(JNode jNode, JPort jPort, JService jService) {
		this.jNode = jNode;
		this.jPort = jPort;
		this.jService = jService;
	}
	
	public String getNodeName() {
		return this.jNode.getName();
	}
	public String getPortName() {
		return this.jPort.getName();
	}
	public String getServiceName() {
		return this.jService.getName();
	}

	public JNode getjNode() {
		return jNode;
	}

	public JPort getjPort() {
		return jPort;
	}

	public JService getjService() {
		return jService;
	}
	
	public CallPoint getCallPoint() {
		CallPoint point = new CallPoint(this.getNodeName(), this.getPortName(), this.getServiceName());
		return point;
	}
	
	@Override
	public String toString() {
		return new ToStringBuilder(this)
				.append("JNode", jNode)
				.append("JPort", jPort)
				.append("JService", jService)
				.toString();
	}
}
